{extend name="public/layout" /}
{block name="head"}{/block}
{block name="body"}

<body>
  <div class="container-fluid p-t-15">
    <div class="card">
      <div class="card-header">
        <h4>添加账号</h4>
      </div>
      <div class="card-body">
        <form class="form-horizontal" id="form" data-url="/system/admin/index.html">
          <div class="form-group">
            <label class="col-sm-2 col- control-label">用户名</label>
            <div class="col-sm-6">
              {:\\helper\\Form::_text('username','',[
              "datatype"=>"*"
              ])}
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">手机号</label>
            <div class="col-sm-6">
              {:\\helper\\Form::_text('mobile','',[
              "datatype"=>"m",
              "ignore"=>"ignore"
              ])}
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">姓名</label>
            <div class="col-sm-6">
              {:\\helper\\Form::_text('name','',[
              "datatype"=>"*"
              ])}
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">密码</label>
            <div class="col-sm-6">
              {:\\helper\\Form::_password('password','',[
              "datatype"=>"*"
              ])}
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">确认密码</label>
            <div class="col-sm-6">
              {:\\helper\\Form::_password('password_confirm','',[
              "datatype"=>"*",
              "recheck"=>"password",
              "errormsg"=>"您两次输入的密码不一致！",
              ])}
            </div>
          </div>
          {eq name="$loginInfo.account_type" value="1"}
          <div class="form-group">
            <label class="col-sm-2 control-label">权限组</label>
            <div class="col-sm-6">
              {:\\helper\\Form::_select('group_id','',[
              "datatype"=>"*",
              "empty-option"=>"|==请选择权限组==",
              "items-data"=>D('AuthGroup')->where('status',1)->select(),
              "items-key"=>"id",
              "items-name"=>"title",
              ])}
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">账号类型</label>
            <div class="col-sm-6">
              <label class="radio radio-inline radio-primary">
                <input type="radio"  datatype="*" name="account_type" value="1" checked /><span>总账号</span>
              </label>
              <label class="radio radio-inline radio-primary">
                <input type="radio"  datatype="*" name="account_type" value="2"  /><span>分账号</span>
              </label>
            </div>
          </div>
          {/eq}
          <div class="form-group">
            <label class="col-sm-2 control-label">状态</label>
            <div class="col-sm-6">
              {:\\helper\\Form::_radio('status','1',[
              "items-data"=>"D:Dict:getDictByClass:10.13",
              "items-key"=>"dict_code",
              "items-name"=>"dict_value",
              ])}
            </div>
          </div>
          <div class="form-group">
            <div class="col-sm-10 col-sm-offset-2">
              <div class="pull-left">
                <button type="button" class="btn btn-primary btn-sub"><i class="mdi mdi-content-save"></i> 保存</button>
                <button type="button" class="btn btn-danger" onclick="helper.closeCurrent()"><i
                    class="mdi mdi-close"></i> 关闭</button>
              </div>
              <div class="pull-left m-l-15">
                <p class="error-msg"></p>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
  <script>
    formHelper.subForm();
  </script>
</body>
{/block}